import { Navigate } from 'react-router-dom'
import { lazy } from 'react'


//主页面
const Main = lazy(() => import('../view/main'))
//案件上报页面
const Report = lazy(() => import('../view/report'))
//上报历史页面
const History = lazy(() => import('../view/history'))
//照片选择页面
const ImagePick = lazy(() => import('../view/imagePic'))
//微信js-sdk
const Demo01 = lazy(() => import('../view/Demo01'))
//文件上传
const FileUploader = lazy(() => import('../view/fileUploader'))

const element = [
	{
		path: 'main',
		element: <Main />,
	},
	{
		path: 'report',
		element: <Report />
	},
	{
		path: 'history',
		element: <History />
	},
	{
		path: 'imagePick',
		element: <ImagePick />
	},
	{
		path: 'demo01',
		element: <Demo01 />
	},
	{
		path: 'fileUploader',
		element: <FileUploader />
	},
	//严格模式，去掉缺省
	{
		path: '/',
		element: <Navigate to='main' />
	}
]


export default element;
